package com.my.mall.manage.shippingAddress.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.my.mall.manage.shippingAddress.service.ShippingAddressManageService;
import com.my.mall.manage.shippingAddress.vo.ShippingAddressManageVo;

@Controller
@RequestMapping("manage/shippingAddress")
public class ShippingAddressManageController {
	@Autowired
	ShippingAddressManageService shippingAddressManageService;

	@RequestMapping("selectShippingAddressList")
	@ResponseBody
	public Map<String, Object> selectShippingAddressList(String orderNumber, int iDisplayStart, int iDisplayLength) {
		List<ShippingAddressManageVo> list = shippingAddressManageService.selectShippingAddressList(orderNumber,
				iDisplayStart, iDisplayLength);
		int size = shippingAddressManageService.selectShippingAddressCount(orderNumber);
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("iTotalRecords", size);
		map.put("iTotalDisplayRecords", size);
		map.put("aaData", list);
		return map;
	}
}